# data = eval(input("请输入匹配的数据："))
# match data:
#     case {'name':'jack','age':22}:
#         print('字典')
#     case [10,20,32]:
#         print('列表')
#     case (11,12,13):
#         print('元祖')
#     case _:
#         print('顺利执行完')

# 合并字典
# d1 = {'name':'jack','age':22}
# d2 = {'a':101,'b':102,'c':103}
# print(d1|d2)


# 同步迭代
sample = {'apple','orange','juice','tea'}  # 集合是无序的
# sample = ['apple', 'orange', 'juice', 'tea']  # 列表是有序的

list1 = [12, 8, 5, 84]
for s, l in zip(sample, list1):
    match s, l:
        case 'apple', 12:
            print('12个苹果')
        case 'orange', 8:
            print('8个橘子')
        case 'juice', 5:
            print('5杯橙汁')
        case 'tea', 84:
            print('84杯茶')



